﻿<pdoUI:BaseView x:Class="NorthwindApp.EmployeeView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:pdoUI="clr-namespace:PDO.UI.Core;assembly=PDO.UI.Core"
    >
    
    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <ListBox DockPanel.Dock="Top" Grid.Row="0" ItemsSource="{Binding EmployeeList}" IsSynchronizedWithCurrentItem="True" DisplayMemberPath="LastName"/>

        <Grid Grid.Row="1">

            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            
            <Label Grid.Row="0" Grid.Column="0" Content="First:" /> <TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding EmployeeList/FirstName}" />
            <Label Grid.Row="1" Grid.Column="0" Content="Last:" /> <TextBox  Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding EmployeeList/LastName}" />
            
            <Button  Grid.Row="2" Grid.Column="0" x:Name="btnAddNew" Content="Add New" Click="btnAddNew_Click"/>
            <Button  Grid.Row="2" Grid.Column="1" x:Name="btnDelete" Content="Delete" Click="btnDelete_Click"/>
            <Button  Grid.Row="2" Grid.Column="2" x:Name="btnSave" Content="Save" Click="btnSave_Click" />
        </Grid>

    </Grid>
</pdoUI:BaseView>
